package com.xuecheng.order.convert;

import com.xuecheng.api.order.model.dto.OrdersDTO;
import com.xuecheng.order.entity.Orders;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * Created on 2021/04/16/23:53 周五
 *
 * @author Lantin
 */

@Mapper
public interface OrdersConvert {

    OrdersConvert INSTANCE = Mappers.getMapper(OrdersConvert.class);

    @Mappings(
            @Mapping(source = "id", target = "orderId")
    )
    OrdersDTO ordersToDTO(Orders orders);

}
